<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="full-screen" content="yes">
    <meta name="x5-fullscreen" content="true">
    <link rel="stylesheet" type="text/css" href="__CSS__/base.css">
    <link rel="stylesheet" type="text/css" href="__CSS__/mybanner.css">
    <link rel="stylesheet" type="text/css" href="__CSS__/dropload.css">
    <script src="__JS__/jquery-3.1.1.min.js"></script>
    <script type="text/javascript" src="__JS__/reset.js"></script>
    <script type="text/javascript" src="__JS__/dropload.js"></script>
    <title>我的海报</title>
</head>
<body>
    <div class="wrap">

      <div class="header">
        <i class="iconfont icon" id="toMy">&#xe60e;</i>
        <div class="header_title">我的海报</div>
      </div>
      <!-- 内容 -->
      <div class="main">
        <ul class="list">
            <li class="item">
              <img class="item_img" src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1539774221081&di=be5f47dc044e9da562b1e2a9ddf0dbf0&imgtype=0&src=http%3A%2F%2Fpic38.nipic.com%2F20140302%2F9352546_213533724000_2.jpg" alt="">
              <p class="item_money">奖励金额:3048元</p>
            </li>
        </ul>
      </div>
    </div>

<script>
  let page = 0;  //加载页面
  $(function(){
        let height =  $(window).height() - $('.header').height();
        $('.main').css('height',height+'px');
        $('.main').dropload({
              /* 上拉加载 */
              loadDownFn: function(me){
                setTimeout(function(){
                  let str = '<li class="item">'+
                              '<img class="item_img" src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1539774221081&di=be5f47dc044e9da562b1e2a9ddf0dbf0&imgtype=0&src=http%3A%2F%2Fpic38.nipic.com%2F20140302%2F9352546_213533724000_2.jpg" alt="">'+
                              '<p class="item_money">3048元</p>'+
                            '</li>';
                  $(".main .list").append(str);
                  me.resetload();
                },2000)
                  
                  // $.ajax({
                  //     type: 'GET',
                  //     url: 'json/more.json',
                  //     dataType: 'json',
                  //     success: function(data){
                  //         alert(data);
                  //         // 每次数据加载完，必须重置
                  //         me.resetload();
                  //     },
                  //     error: function(xhr, type){
                  //         alert('Ajax error!');
                  //         // 即使加载出错，也得重置
                  //         me.resetload();
                  //     }
                  // });
              },
              /* 下拉刷新 */
              loadUpFn: function(me){

                  let str = '<li class="item">'+
                              '<img class="item_img" src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1539774221081&di=be5f47dc044e9da562b1e2a9ddf0dbf0&imgtype=0&src=http%3A%2F%2Fpic38.nipic.com%2F20140302%2F9352546_213533724000_2.jpg" alt="">'+
                              '<p class="item_money">3048元</p>'+
                            '</li>';
                  $(".main .list").html(str);
                  console.log(me);
                  me.resetload();
                  // $.ajax({
                  //     type: 'GET',
                  //     url: 'json/more.json',
                  //     dataType: 'json',
                  //     success: function(data){
                  //         alert(data);
                  //         // 每次数据加载完，必须重置
                  //         me.resetload();
                  //     },
                  //     error: function(xhr, type){
                  //         alert('Ajax error!');
                  //         // 即使加载出错，也得重置
                  //         me.resetload();
                  //     }
                  // });
              },
        });
})
    </script>

</body>
</html>